<script lang='ts' setup>
import { reactive } from 'vue'
import UnitTree from './unit-tree.vue'
const emit = defineEmits<{
    (e: 'node-click', row: ReturnTree<any>, column: any, event: Event): void//行点击事件
}>()

const UnitTreeCardState = reactive({
    /**节点点击事件 */
    handleNodeClick: (treeData: ReturnTree<any>, column: any, event: Event) => {
        emit("node-click", treeData, column, event)
    },
})
</script>
<template>
    <el-card class="vms-org-unit-tree-card">
        <template #header>
            <span class="jxtech-card-title">组织部门树</span>
        </template>
        <unit-tree @node-click="UnitTreeCardState.handleNodeClick" class="vms-org-unit-tree"></unit-tree>
    </el-card>
</template>
<style scoped lang="scss">
.vms-org-unit-tree-card {
    resize: horizontal;
    position: relative;
    z-index: 999;
}

.vms-org-unit-tree-card {
    ::v-deep(.el-card__body) {
        padding: 20px;
        height: calc(100% - 54px);
    }
}
.vms-org-unit-tree {
    height: 100%;
    overflow: auto;
}
</style>